home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 2528 < prev    next >
Encoding:
Internet Message Format  |  1996-08-06  |  2.4 KB

  1. Path: news.cc.uic.edu!sunphy1!olczyk
  2. From: olczyk@sunphy1 (Jung Oh)
  3. Newsgroups: comp.lang.c++,comp.lang.pascal.delphi.misc
  4. Subject: Re: C++ with Zapp vs. Delphi
  5. Followup-To: comp.lang.c++,comp.lang.pascal.delphi.misc
  6. Date: 18 Jan 1996 06:24:12 GMT
  7. Organization: University of Illinois at Chicago
  8. Message-ID: <4dkp2c$3d7m@tigger.cc.uic.edu>
  9. References: <4coar6$d4n@sun4.bham.ac.uk> <4coip7$69s@news1.usa.pipeline.com> <WaE/w0JfFiKC089yn@oslonett.no>
  10. NNTP-Posting-Host: sunphy1.phy.uic.edu
  11. X-Newsreader: TIN [version 1.2 PL2]
  12.  
  13. Rune Moberg (mobergru@oslonett.no) wrote:
  14. Your half year is still insufficient (unless you have several years of 
  15. assembler ) to qualify you as a C programmer. From a general observance
  16. of the job market anything less then two years of C is still entry level 
  17. (this observation has been confirmed by many of my friends). That is two years
  18. of full-time C. College work doesn't count, allthough some people will
  19. take a year of C and several years of research.
  20. : Anyway, without looking in any books, this is what I deciphered:
  21.  
  22. : void (ah, a function returning nothing - aka procedure in Pascal)
  23. : sort (the function name)
  24. : void* base (uhm... An undefined pointer?)
  25. pointer to undefined type -- like Pascal POINTER
  26.  
  27. : unsigned n (probably an unsigned integer - aka word in Pascal)
  28. Yes also probably a typo on Bjarne's part.
  29.  
  30. : unsigned int sz (definatively an unsigned integer)
  31. : CFT cmp (right, a variable of type CFT declared above)
  32.  
  33. : typedef int (*CFT) (void*,void*);
  34. : is what got me. What is this? Could it be a typedeclaring a function
  35. : returning an int, with two undefined arguments (pointers)? It would
  36. : probably deserve a comment (or three), or one could write it in Pascal.
  37. No need for a comment. Any one reading a good C program from cover to cover.
  38. The only complaint I have is with CFT. I like Compare or IsLarger better. 
  39.  
  40. : An event is just another method, handling all TObject descendants
  41. : (through the Sender parameter of type TObject)? 
  42. No. An event is implemented as a function pointer. The actual code handling 
  43. the event is a function/procedure. This function/procedure can be a method,
  44. but it doesn't have be.
  45. However the whole arguement  begs the question. When a method accepts a TObject
  46. and typecasts it to other types so that it can send a method to it, the 
  47. method's class can never be closed to change since there may be other 
  48. classes generated later which must be typecast also.
  49. ---------------------------
  50. Thaddeus L. Olczyk
  51.